package com.zx.framework.web.listener;


import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

import org.apache.log4j.Logger;

import com.zx.framework.core.env.Environment;
/**
 * 
 * @author stylewolf
 *
 */
@WebListener
public class EnvironmentListener implements ServletContextListener
{
	private static final Logger LOG = Logger.getLogger(EnvironmentListener.class);

	public void contextDestroyed(ServletContextEvent arg0)
	{
		LOG.info("EnvironmentListener listener destroy....");
	}

	public void contextInitialized(ServletContextEvent arg0)
	{				
		LOG.info("正在启动EnvironmentListener监听....");
		Environment.readEnvironment(arg0.getServletContext());
	} 
}
